package com.useful.core.exception;
import com.useful.core.api.IResultCode;
import lombok.Getter;

/**
 * @author : wenchao.long
 * @date : Created in 2021/8/25 17:04 周三
 * @description : 业务异常
 */
public class BizException extends RuntimeException {

    private static final long serialVersionUID = 6423505693717745039L;

    @Getter
    private IResultCode resultCode;

    public BizException(IResultCode resultCode) {
        super(resultCode.getMessage());
        this.resultCode = resultCode;
    }

    public BizException(String message) {
        super(message);
    }

    public BizException(String message, Throwable cause) {
        super(message, cause);
    }

    public BizException(Throwable cause) {
        super(cause);
    }
}
